package com.runda.biz.service;

import java.util.List;

import com.bbjob.model.ProductQuotationRecord;
import com.bbjob.util.service.impl.BaseService;

import org.springframework.stereotype.Service;
@Service
public class ProductQuotationRecordService extends BaseService<ProductQuotationRecord>
        implements IProductQuotationRecordService {

    @Override
    public int saveAll(List<ProductQuotationRecord> list, Integer productId) {
        list.forEach(record -> {
            record.setProductId(productId);
            this.mapper.insert(record);
        });
        return 0;
    }

    @Override
    public List<ProductQuotationRecord> getQuotationRecordsByProductId(Integer productId) {
        ProductQuotationRecord record=new ProductQuotationRecord();
        record.setProductId(productId);
        return this.selectByRecord(record);
    }

}